/**
 * 顶层Provider组件，提供给子组件context内的history对象
 * @date    2019-11-20 11:01:53
 * @Author  likai
 */
import React, {useState,createContext,useEffect} from 'react'
import utils from '@utils'
export const HistoryContext = new createContext()
// export const HistoryConsumer = Context.Consumer
export const HistoryProvider =(props)=>{
	let {history,location} = props
	return <HistoryContext.Provider value={{
		location,
		history,
	}}>
		{props.children}
	</HistoryContext.Provider>
}

